Integrand size = 21, antiderivative size = 79 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {x (a+b x)}{3 \left (1+x^3\right )}-\frac {(2 a+b) \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {1}{9} (2 a-b) \log (1+x)-\frac {1}{18} (2 a-b) \log \left (1-x+x^2\right ) \]
[Out]
Time = 0.05 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {823, 1869, 1874, 31, 648, 632, 210, 642} \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=-\frac {(2 a+b) \arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {x (a+b x)}{3 \left (x^3+1\right )}-\frac {1}{18} (2 a-b) \log \left (x^2-x+1\right )+\frac {1}{9} (2 a-b) \log (x+1) \]
[In]
[Out]
Rule 31
Rule 210
Rule 632
Rule 642
Rule 648
Rule 823
Rule 1869
Rule 1874
Rubi steps \begin{align*} \text {integral}& = \int \frac {a+b x}{\left (1+x^3\right )^2} \, dx \\ & = \frac {x (a+b x)}{3 \left (1+x^3\right )}-\frac {1}{3} \int \frac {-2 a-b x}{1+x^3} \, dx \\ & = \frac {x (a+b x)}{3 \left (1+x^3\right )}-\frac {1}{9} \int \frac {-4 a-b+(2 a-b) x}{1-x+x^2} \, dx-\frac {1}{9} (-2 a+b) \int \frac {1}{1+x} \, dx \\ & = \frac {x (a+b x)}{3 \left (1+x^3\right )}+\frac {1}{9} (2 a-b) \log (1+x)-\frac {1}{6} (-2 a-b) \int \frac {1}{1-x+x^2} \, dx-\frac {1}{18} (2 a-b) \int \frac {-1+2 x}{1-x+x^2} \, dx \\ & = \frac {x (a+b x)}{3 \left (1+x^3\right )}+\frac {1}{9} (2 a-b) \log (1+x)-\frac {1}{18} (2 a-b) \log \left (1-x+x^2\right )-\frac {1}{3} (2 a+b) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right ) \\ & = \frac {x (a+b x)}{3 \left (1+x^3\right )}-\frac {(2 a+b) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {1}{9} (2 a-b) \log (1+x)-\frac {1}{18} (2 a-b) \log \left (1-x+x^2\right ) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.91 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {1}{18} \left (\frac {6 x (a+b x)}{1+x^3}+2 \sqrt {3} (2 a+b) \arctan \left (\frac {-1+2 x}{\sqrt {3}}\right )+2 (2 a-b) \log (1+x)+(-2 a+b) \log \left (1-x+x^2\right )\right ) \]
[In]
[Out]
Time = 0.43 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.20
method | result | size |
default | \(-\frac {\left (-a -2 b \right ) x -a +b}{9 \left (x^{2}-x +1\right )}-\frac {\left (2 a -b \right ) \ln \left (x^{2}-x +1\right )}{18}-\frac {2 \left (-3 a -\frac {3 b}{2}\right ) \sqrt {3}\, \arctan \left (\frac {\left (-1+2 x \right ) \sqrt {3}}{3}\right )}{27}-\frac {\frac {a}{9}-\frac {b}{9}}{1+x}+\left (-\frac {b}{9}+\frac {2 a}{9}\right ) \ln \left (1+x \right )\) | \(95\) |
risch | \(\frac {\frac {1}{3} b \,x^{2}+\frac {1}{3} a x}{\left (1+x \right ) \left (x^{2}-x +1\right )}-\frac {a \ln \left (16 a^{2} x^{2}-8 a b \,x^{2}+4 b^{2} x^{2}-16 a^{2} x +8 a b x -4 b^{2} x +16 a^{2}-8 b a +4 b^{2}\right )}{9}+\frac {b \ln \left (16 a^{2} x^{2}-8 a b \,x^{2}+4 b^{2} x^{2}-16 a^{2} x +8 a b x -4 b^{2} x +16 a^{2}-8 b a +4 b^{2}\right )}{18}+\frac {2 \ln \left (1+x \right ) a}{9}-\frac {\ln \left (1+x \right ) b}{9}+\frac {2 \sqrt {3}\, a \arctan \left (\frac {8 a^{2} \sqrt {3}\, x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {4 a^{2} \sqrt {3}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}+\frac {2 a b \sqrt {3}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {4 \sqrt {3}\, a b x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}+\frac {2 \sqrt {3}\, b^{2} x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {\sqrt {3}\, b^{2}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}\right )}{9}+\frac {2 \sqrt {3}\, a \arctan \left (-\frac {\sqrt {3}}{3}+\frac {\sqrt {3}\, b}{3 a}\right )}{9}+\frac {\sqrt {3}\, b \arctan \left (\frac {8 a^{2} \sqrt {3}\, x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {4 a^{2} \sqrt {3}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}+\frac {2 a b \sqrt {3}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {4 \sqrt {3}\, a b x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}+\frac {2 \sqrt {3}\, b^{2} x}{3 \left (4 a^{2}-2 b a +b^{2}\right )}-\frac {\sqrt {3}\, b^{2}}{3 \left (4 a^{2}-2 b a +b^{2}\right )}\right )}{9}+\frac {\sqrt {3}\, b \arctan \left (-\frac {\sqrt {3}}{3}+\frac {\sqrt {3}\, b}{3 a}\right )}{9}\) | \(499\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.30 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {6 \, b x^{2} + 2 \, \sqrt {3} {\left ({\left (2 \, a + b\right )} x^{3} + 2 \, a + b\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + 6 \, a x - {\left ({\left (2 \, a - b\right )} x^{3} + 2 \, a - b\right )} \log \left (x^{2} - x + 1\right ) + 2 \, {\left ({\left (2 \, a - b\right )} x^{3} + 2 \, a - b\right )} \log \left (x + 1\right )}{18 \, {\left (x^{3} + 1\right )}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 238, normalized size of antiderivative = 3.01 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {\left (2 a - b\right ) \log {\left (x + \frac {4 a^{2} \cdot \left (2 a - b\right ) + 4 a b^{2} + b \left (2 a - b\right )^{2}}{8 a^{3} + b^{3}} \right )}}{9} + \left (- \frac {a}{9} + \frac {b}{18} - \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right ) \log {\left (x + \frac {36 a^{2} \left (- \frac {a}{9} + \frac {b}{18} - \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right ) + 4 a b^{2} + 81 b \left (- \frac {a}{9} + \frac {b}{18} - \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right )^{2}}{8 a^{3} + b^{3}} \right )} + \left (- \frac {a}{9} + \frac {b}{18} + \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right ) \log {\left (x + \frac {36 a^{2} \left (- \frac {a}{9} + \frac {b}{18} + \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right ) + 4 a b^{2} + 81 b \left (- \frac {a}{9} + \frac {b}{18} + \frac {\sqrt {3} i \left (2 a + b\right )}{18}\right )^{2}}{8 a^{3} + b^{3}} \right )} + \frac {a x + b x^{2}}{3 x^{3} + 3} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.90 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {1}{9} \, \sqrt {3} {\left (2 \, a + b\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) - \frac {1}{18} \, {\left (2 \, a - b\right )} \log \left (x^{2} - x + 1\right ) + \frac {1}{9} \, {\left (2 \, a - b\right )} \log \left (x + 1\right ) + \frac {b x^{2} + a x}{3 \, {\left (x^{3} + 1\right )}} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.28 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {1}{9} \, \sqrt {3} {\left (2 \, a + b\right )} \arctan \left (-\sqrt {3} {\left (\frac {2}{x + 1} - 1\right )}\right ) - \frac {1}{18} \, {\left (2 \, a - b\right )} \log \left (-\frac {3}{x + 1} + \frac {3}{{\left (x + 1\right )}^{2}} + 1\right ) - \frac {a}{9 \, {\left (x + 1\right )}} + \frac {b}{9 \, {\left (x + 1\right )}} - \frac {b + \frac {a - b}{x + 1}}{9 \, {\left (\frac {3}{x + 1} - \frac {3}{{\left (x + 1\right )}^{2}} - 1\right )}} \]
[In]
[Out]
Time = 11.07 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.23 \[ \int \frac {a+b x}{(1+x)^2 \left (1-x+x^2\right )^2} \, dx=\frac {\frac {b\,x^2}{3}+\frac {a\,x}{3}}{x^3+1}-\ln \left (x-\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {a}{9}-\frac {b}{18}+\frac {\sqrt {3}\,a\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,b\,1{}\mathrm {i}}{18}\right )+\ln \left (x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {b}{18}-\frac {a}{9}+\frac {\sqrt {3}\,a\,1{}\mathrm {i}}{9}+\frac {\sqrt {3}\,b\,1{}\mathrm {i}}{18}\right )+\ln \left (x+1\right )\,\left (\frac {2\,a}{9}-\frac {b}{9}\right ) \]
[In]
[Out]